package com.xinchen.aiowaste.model.api

import com.maple.model.entity.aio.DevListEntity
import com.maple.model.entity.aio.FacilityListEntity
import com.maple.model.entity.aio.LabelInfoEntity
import com.maple.model.entity.aio.LabelListEntity
import com.maple.model.entity.aio.LoginEntity
import com.maple.model.entity.aio.StorehouseListEntity
import com.maple.model.entity.aio.WarehousEntity
import com.maple.model.entity.aio.WarehouseListEntity
import com.maple.model.entity.aio.WasteListEntity
import com.maple.model.resp.BaseResp
import com.maple.utils.const.Global
import okhttp3.RequestBody
import retrofit2.http.*

interface ApiService {

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_LOGIN)
    suspend fun login(@Body requestBody: RequestBody): LoginEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_DEV_INFO)
    suspend fun devInfo(@Body requestBody: RequestBody): DevListEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_ENV_INFO)
    suspend fun envInfo(@Body requestBody: RequestBody): BaseResp

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_WASTE_LIST)
    suspend fun wasteList(@Body requestBody: RequestBody): WasteListEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @GET(ApiURL.URL_FACILITY_LIST)
    suspend fun facilityList(@Query("entId") entId: String,@Query("status") status: String): FacilityListEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_WAREHOUSE_LIST)
    suspend fun warehouseList(@Body requestBody: RequestBody): WarehouseListEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_STOREHOUSE_LIST)
    suspend fun storehouseList(@Body requestBody: RequestBody): StorehouseListEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_INBOUND_SUBMIT)
    suspend fun inboundSubmit(@Body requestBody: RequestBody): WarehousEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_LABEL_INFO)
    suspend fun getLabelInfo(@Body requestBody: RequestBody): LabelInfoEntity

    @Headers("${Global.DOMAIN}:${Global.URL_FINAL}")
    @POST(ApiURL.URL_LABEL_LIST)
    suspend fun getLabelList(@Body requestBody: RequestBody): LabelListEntity

}